﻿// Decompiled with JetBrains decompiler
// Type: Bannerlord.BUTR.Shared.Helpers.ModuleInfoExtendedWithMetadata
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using Bannerlord.ModuleManager;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Text;

#nullable enable
namespace Bannerlord.BUTR.Shared.Helpers
{
  [ExcludeFromCodeCoverage]
  [DebuggerNonUserCode]
  internal class ModuleInfoExtendedWithMetadata : 
    ModuleInfoExtended,
    IEquatable<
    #nullable disable
    ModuleInfoExtendedWithMetadata>
  {
    [CompilerGenerated]
    protected override 
    #nullable enable
    Type EqualityContract => typeof (ModuleInfoExtendedWithMetadata);

    public bool IsExternal { get; }

    public string Path { get; }

    public ModuleInfoExtendedWithMetadata(ModuleInfoExtended module, bool isExternal, string path)
      : base(module)
    {
      this.IsExternal = isExternal;
      this.Path = path;
    }

    [CompilerGenerated]
    public override string ToString()
    {
      StringBuilder builder = new StringBuilder();
      builder.Append(nameof (ModuleInfoExtendedWithMetadata));
      builder.Append(" { ");
      if (this.PrintMembers(builder))
        builder.Append(' ');
      builder.Append('}');
      return builder.ToString();
    }

    [CompilerGenerated]
    protected override bool PrintMembers(StringBuilder builder)
    {
      if (base.PrintMembers(builder))
        builder.Append(", ");
      builder.Append("IsExternal = ");
      builder.Append(this.IsExternal.ToString());
      builder.Append(", Path = ");
      builder.Append((object) this.Path);
      return true;
    }

    [CompilerGenerated]
    public static bool operator !=(
      ModuleInfoExtendedWithMetadata? left,
      ModuleInfoExtendedWithMetadata? right)
    {
      return !(left == right);
    }

    [CompilerGenerated]
    public static bool operator ==(
      ModuleInfoExtendedWithMetadata? left,
      ModuleInfoExtendedWithMetadata? right)
    {
      if ((object) left == (object) right)
        return true;
      return (object) left != null && left.Equals(right);
    }

    [CompilerGenerated]
    public override int GetHashCode()
    {
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      return (base.GetHashCode() * -1521134295 + EqualityComparer<bool>.Default.GetHashCode(this.\u003CIsExternal\u003Ek__BackingField)) * -1521134295 + EqualityComparer<string>.Default.GetHashCode(this.\u003CPath\u003Ek__BackingField);
    }

    [CompilerGenerated]
    public override bool Equals(object? obj) => this.Equals(obj as ModuleInfoExtendedWithMetadata);

    [CompilerGenerated]
    public override sealed bool Equals(ModuleInfoExtended? other) => this.Equals((object) other);

    [CompilerGenerated]
    public virtual bool Equals(ModuleInfoExtendedWithMetadata? other)
    {
      if ((object) this == (object) other)
        return true;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      return base.Equals((ModuleInfoExtended) other) && EqualityComparer<bool>.Default.Equals(this.\u003CIsExternal\u003Ek__BackingField, other.\u003CIsExternal\u003Ek__BackingField) && EqualityComparer<string>.Default.Equals(this.\u003CPath\u003Ek__BackingField, other.\u003CPath\u003Ek__BackingField);
    }

    [CompilerGenerated]
    public override ModuleInfoExtended \u003CClone\u003E\u0024()
    {
      return (ModuleInfoExtended) new ModuleInfoExtendedWithMetadata(this);
    }

    [CompilerGenerated]
    protected ModuleInfoExtendedWithMetadata(ModuleInfoExtendedWithMetadata original)
      : base((ModuleInfoExtended) original)
    {
      this.IsExternal = original.IsExternal;
      this.Path = original.Path;
    }
  }
}
